

<!DOCTYPE html>
<html lang="en" data-default-color-scheme=&#34;auto&#34;>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/my_blog/img/favicon.ico">
  <link rel="icon" type="image/png" href="/my_blog/img/favicon.ico">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="">
  <meta name="author" content="John Doe">
  <meta name="keywords" content="">
  <title>JavaScript-ajax - Defame。</title>

  <link  rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.staticfile.org/github-markdown-css/4.0.0/github-markdown.min.css" />
  <link  rel="stylesheet" href="/my_blog/lib/hint/hint.min.css" />

  
    
    <link  rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/10.0.0/styles/github-gist.min.css" />
  

  


<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_6peoq002giu.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_pjno9b9zyxs.css">


<link  rel="stylesheet" href="/my_blog/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script  src="/my_blog/js/utils.js" ></script>
  <script  src="/my_blog/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 4.2.1"></head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/my_blog/">&nbsp;<strong>Defame。</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/my_blog/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/my_blog/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/my_blog/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/my_blog/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/my_blog/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" data-toggle="modal" data-target="#modalSearch">&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;</a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" href="javascript:">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner intro-2" id="background" parallax=true
         style="background: url('/my_blog/img/jq.jpg') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="container page-header text-center fade-in-up">
            <span class="h2" id="subtitle">
              
            </span>

            
              
  <div class="mt-3 post-meta">
    <i class="iconfont icon-date-fill" aria-hidden="true"></i>
    <time datetime="2020-05-26 19:45" pubdate>
      May 26, 2020 pm
    </time>
  </div>


<div class="mt-1">
  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      817 字
    </span>
  

  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      10
       分钟
    </span>
  

  
  
</div>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid">
  <div class="row">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-md">
      <div class="container nopadding-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto" id="post">
            <!-- SEO header -->
            <h1 style="display: none">JavaScript-ajax</h1>
            
            <div class="markdown-body" id="post-body">
              <h2 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h2><h4 id="5道ajax面试题"><a href="#5道ajax面试题" class="headerlink" title="5道ajax面试题"></a>5道ajax面试题</h4><h3 id="1、什么是-AJAX？干什么用的？"><a href="#1、什么是-AJAX？干什么用的？" class="headerlink" title="1、什么是 AJAX？干什么用的？"></a>1、什么是 AJAX？干什么用的？</h3><pre><code class="hljs mipsasm"><span class="hljs-number">1</span>.AJAX（Asynchronous <span class="hljs-keyword">JavaScript </span><span class="hljs-keyword">And </span>XML）
翻译过来： 异步的 <span class="hljs-keyword">JavaScript </span>和 XML。
<span class="hljs-number">2</span>.用途：<span class="hljs-keyword">JavaScript </span>这门语言用来和其他计算机进行数据通信的技术。
俗称：调用服务器接口用的。</code></pre>
<h3 id="2、JS-如何实现-AJAX？"><a href="#2、JS-如何实现-AJAX？" class="headerlink" title="2、JS 如何实现 AJAX？"></a>2、JS 如何实现 AJAX？</h3><pre><code class="hljs angelscript"><span class="hljs-number">1.</span>使用 JS 原生的 AJAX 技术
<span class="hljs-number">2.</span>使用 jQuery 中封装好的 $.ajax 技术
<span class="hljs-number">3.</span>使用基 Promise 的 axios 包，这个包的好处是已经将AJAX都封装成的 Promise 对象</code></pre>
<h3 id="3、使用-JS-实现原生-AJAX-的流程？"><a href="#3、使用-JS-实现原生-AJAX-的流程？" class="headerlink" title="3、使用 JS 实现原生 AJAX 的流程？"></a>3、使用 JS 实现原生 AJAX 的流程？</h3><pre><code class="hljs angelscript"><span class="hljs-number">1.</span>创建 XMLHttpRequest 对象（浏览器 中有一个 XMLHttpRequest 对象，使用它来执行 AJAX 的）
<span class="hljs-number">2.</span>配置这个对象：提交地址、回调函数等
<span class="hljs-number">3.</span>发送请求
<span class="hljs-number">4.</span>根据请求的状态来执行不同的操作</code></pre>
<h4 id="代码演示"><a href="#代码演示" class="headerlink" title="代码演示"></a>代码演示</h4><pre><code class="hljs javascript"><span class="hljs-comment">// 1. 创建 XMLHttpRequest 对象</span>
<span class="hljs-keyword">const</span> xhr = <span class="hljs-keyword">new</span> XMLHttpRequest()
<span class="hljs-comment">// 2. 设置回调函数，用来监听 AJAX 的状态变化</span>
xhr.onreadystatechange = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>&#123;
    <span class="hljs-comment">// 2.1. 根据不同的状态做不同的处理</span>
    <span class="hljs-comment">// 判断是否连接服务器成功并且服务器返回状态码为 200</span>
    <span class="hljs-keyword">if</span>(xhr.readyState == <span class="hljs-number">4</span> &amp;&amp; xhr.status == <span class="hljs-number">200</span>) &#123;
        <span class="hljs-comment">// 2.2. 打印返回值</span>
        <span class="hljs-built_in">console</span>.log( xhr.responseText )
    &#125;
&#125;
<span class="hljs-comment">// 3. 设置请求方式及请求地址</span>
xhr.open(<span class="hljs-string">'GET'</span>, <span class="hljs-string">'http://xxxxx'</span>)
<span class="hljs-comment">// 4. 发送请求</span>
xhr.send()</code></pre>
<h3 id="4、如何将原生的-AJAX-封装成-Promise-对象来使用？流程是什么？"><a href="#4、如何将原生的-AJAX-封装成-Promise-对象来使用？流程是什么？" class="headerlink" title="4、如何将原生的 AJAX 封装成 Promise 对象来使用？流程是什么？"></a>4、如何将原生的 AJAX 封装成 Promise 对象来使用？流程是什么？</h3><pre><code class="hljs javascript">首先创建一个函数，在函数中创建一个 <span class="hljs-built_in">Promise</span> 对象并返回，在 <span class="hljs-built_in">Promise</span> 对象中放一个回调函数，这个回调函数上有两个参数，第一个参数是在成功时调用设置返回的信息，第二个参数是在失败时调用设置失败信息。将异步代码放到这个回调函数中，然后判断如果异步代码执行成功就调用 <span class="hljs-built_in">Promise</span> 的第一个参数的函数来设置返回值，如果异步失败就调用第二个参数的函数来设置失败信息。</code></pre>
<h4 id="代码演示-1"><a href="#代码演示-1" class="headerlink" title="代码演示"></a>代码演示</h4><pre><code class="hljs javascript"><span class="hljs-comment">// 封装一个发送 get 请求的函数</span>
<span class="hljs-comment">// 参数：请求地址</span>
<span class="hljs-comment">// 返回：Promise 对象</span>
<span class="hljs-keyword">const</span> xhr = <span class="hljs-keyword">new</span> XMLHttpRequest()
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">get</span>(<span class="hljs-params">url</span>) </span>&#123;
    <span class="hljs-comment">// 参数一、ok：函数，成功时设置返回值</span>
    <span class="hljs-comment">// 参数二、err：函数，失败时设置失败的信息</span>
    <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Promise</span>(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">ok, err</span>)</span>&#123;
        xhr.onreadystatechange = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>&#123;
            <span class="hljs-keyword">if</span>(xhr.readyState == <span class="hljs-number">4</span> &amp;&amp; xhr.status == <span class="hljs-number">200</span>) &#123;
                ok(xhr.responseText)
            &#125; <span class="hljs-keyword">else</span> &#123;
                err(<span class="hljs-string">"连接失败"</span>)
            &#125;
        &#125;
        xhr.open(<span class="hljs-string">'GET'</span>, url)
        xhr.send()
    &#125;)
&#125;

<span class="hljs-comment">// 用法一、ES6</span>
<span class="hljs-keyword">get</span>('http://xxxxxx').then(res=&gt;&#123;
    <span class="hljs-built_in">console</span>.log( res.data )
&#125;)

<span class="hljs-comment">// 用法二、ES8</span>
<span class="hljs-keyword">async</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getData</span>(<span class="hljs-params"></span>) </span>&#123;
    <span class="hljs-keyword">let</span> &#123;data&#125; = <span class="hljs-keyword">await</span> <span class="hljs-keyword">get</span>('http://xxxxxx')
    console.log(data)
&#125;
getData()</code></pre>
<h3 id="5、什么是-AJAX-跨域？怎么解决？"><a href="#5、什么是-AJAX-跨域？怎么解决？" class="headerlink" title="5、什么是 AJAX 跨域？怎么解决？"></a>5、什么是 AJAX 跨域？怎么解决？</h3><pre><code class="hljs plain">出于安全的考虑，浏览器会限制 AJAX 不允许跨域请求服务器。</code></pre>
<h4 id="什么情况是跨域？"><a href="#什么情况是跨域？" class="headerlink" title="什么情况是跨域？"></a>什么情况是跨域？</h4><pre><code class="hljs awk">情况一、端口号不同 ： http:<span class="hljs-regexp">//</span>localhost:<span class="hljs-number">9000</span> 和 http:<span class="hljs-regexp">//</span>localhost:<span class="hljs-number">8000</span>
情况二、域名不同 ：http:<span class="hljs-regexp">//</span>www.badiu.com 和 http:<span class="hljs-regexp">//</span>www.jd.com</code></pre>
<h4 id="解决办法有-3-种："><a href="#解决办法有-3-种：" class="headerlink" title="解决办法有 3 种："></a>解决办法有 3 种：</h4><pre><code class="hljs angelscript"><span class="hljs-number">1.</span>jsonp
优点：没有浏览器的限制（低端的 IE 也支持）
缺点：只能发送 GET 请求
<span class="hljs-number">2.</span>CORS（跨站资源共享）
优点：由后端完成，前端完全不用改代码，支持各种请求（GET、POST、PUT、DELETE等）
缺点：低端IE不支持
<span class="hljs-number">3.</span>服务器代理
优点：没有任何限制
缺点：需要再写个代理服务器的程序</code></pre>
            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                  <div class="post-meta mr-3">
                    <i class="iconfont icon-category"></i>
                    
                      <a class="hover-with-bg" href="/my_blog/categories/%E5%89%8D%E7%AB%AF%E9%9D%A2%E8%AF%95/">前端面试</a>
                    
                  </div>
                
                
                  <div class="post-meta">
                    <i class="iconfont icon-tags"></i>
                    
                      <a class="hover-with-bg" href="/my_blog/tags/JavaScript%E9%9D%A2%E8%AF%95%E9%A2%98/">JavaScript面试题</a>
                    
                  </div>
                
              </div>
              
                <p class="note note-warning">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" target="_blank" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！</p>
              
              
                <div class="post-prevnext row">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/my_blog/2020/05/26/JavaScript-%E5%BC%82%E6%AD%A5/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">JavaScript-异步</span>
                        <span class="visible-mobile">Previous</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/my_blog/2020/05/25/JavaScript%E5%AD%97%E7%AC%A6%E4%B8%B2%E9%9D%A2%E8%AF%95%E9%A2%98/">
                        <span class="hidden-mobile">JavaScript字符串面试题</span>
                        <span class="visible-mobile">Next</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
              <!-- Comments -->
              <article class="comments" id="comments">
                
                
  <div class="disqus" style="width:100%">
    <div id="disqus_thread"></div>
    <script type="text/javascript">
      function loadDisqus() {
        var disqus_config = function () {
          this.page.url = 'https://defame.gitee.io/my_blog/2020/05/26/JavaScript-ajax/';
          this.page.identifier = '/2020/05/26/JavaScript-ajax/';
        };
        (function () {
          var d = document,
            s = d.createElement('script');
          s.src = '//' + '' + '.disqus.com/embed.js';
          s.setAttribute('data-timestamp', new Date());
          (d.head || d.body).appendChild(s);
        })();
      }
      waitElementVisible('disqus_thread', loadDisqus);
    </script>
    <noscript>Please enable JavaScript to view the
      <a href="https://disqus.com/?ref_noscript" target="_blank" rel="nofollow noopener noopener">comments powered by Disqus.</a>
    </noscript>
  </div>


              </article>
            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;TOC</p>
  <div id="tocbot"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    
  </main>

  
    <a id="scroll-top-button" href="#" role="button">
      <i class="iconfont icon-arrowup" aria-hidden="true"></i>
    </a>
  

  
    <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">Search</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">keyword</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
  

  

  

  <footer class="mt-5">
  <div class="text-center py-3">
    <div>
      <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a>
      <i class="iconfont icon-love"></i>
      <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener">
        <span>Fluid</span></a>
    </div>
    
  <div class="statistics">
    
    

    
      
        <!-- 不蒜子统计PV -->
        <span id="busuanzi_container_site_pv" style="display: none">
            总访问量 
            <span id="busuanzi_value_site_pv"></span>
             次
          </span>
      
      
        <!-- 不蒜子统计UV -->
        <span id="busuanzi_container_site_uv" style="display: none">
            总访客数 
            <span id="busuanzi_value_site_uv"></span>
             人
          </span>
      
    
  </div>


    
  <!-- 备案信息 -->
  <div class="beian">
    <a href="http://beian.miit.gov.cn/" target="_blank"
       rel="nofollow noopener">京ICP证123456号</a>
    
      <a
        href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=12345678"
        rel="nofollow noopener"
        class="beian-police"
        target="_blank"
      >
        <span class="beian-police-sep">&nbsp;|&nbsp;</span>
        
          <img src="/my_blog/img/police_beian.png" srcset="/my_blog/img/loading.gif" alt="police-icon" />
        
        <span>京公网安备12345678号</span>
      </a>
     
  </div>


    
  </div>
</footer>

<!-- SCRIPTS -->
<script  src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js" ></script>
<script  src="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/js/bootstrap.min.js" ></script>
<script  src="/my_blog/js/debouncer.js" ></script>
<script  src="/my_blog/js/main.js" ></script>

<!-- Plugins -->


  
    <script  src="/my_blog/js/lazyload.js" ></script>
  



  <script defer src="https://cdn.staticfile.org/clipboard.js/2.0.6/clipboard.min.js" ></script>
  <script  src="/my_blog/js/clipboard-use.js" ></script>



  <script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>





  <script  src="https://cdn.staticfile.org/tocbot/4.11.1/tocbot.min.js" ></script>
  <script>
    $(document).ready(function () {
      var boardCtn = $('#board-ctn');
      var boardTop = boardCtn.offset().top;

      tocbot.init({
        tocSelector: '#tocbot',
        contentSelector: '#post-body',
        headingSelector: 'h1,h2,h3,h4,h5,h6',
        linkClass: 'tocbot-link',
        activeLinkClass: 'tocbot-active-link',
        listClass: 'tocbot-list',
        isCollapsedClass: 'tocbot-is-collapsed',
        collapsibleClass: 'tocbot-is-collapsible',
        collapseDepth: 0,
        scrollSmooth: true,
        headingsOffset: -boardTop
      });
      if ($('.toc-list-item').length > 0) {
        $('#toc').css('visibility', 'visible');
      }
    });
  </script>



  <script  src="https://cdn.staticfile.org/typed.js/2.0.11/typed.min.js" ></script>
  <script>
    var typed = new Typed('#subtitle', {
      strings: [
        '  ',
        "JavaScript-ajax&nbsp;",
      ],
      cursorChar: "_",
      typeSpeed: 70,
      loop: false,
    });
    typed.stop();
    $(document).ready(function () {
      $(".typed-cursor").addClass("h2");
      typed.start();
    });
  </script>



  <script  src="https://cdn.staticfile.org/anchor-js/4.2.2/anchor.min.js" ></script>
  <script>
    anchors.options = {
      placement: "right",
      visible: "hover",
      
    };
    var el = "h1,h2,h3,h4,h5,h6".split(",");
    var res = [];
    for (item of el) {
      res.push(".markdown-body > " + item)
    }
    anchors.add(res.join(", "))
  </script>



  <script  src="/my_blog/js/local-search.js" ></script>
  <script>
    var path = "/my_blog/local-search.xml";
    var inputArea = document.querySelector("#local-search-input");
    inputArea.onclick = function () {
      searchFunc(path, 'local-search-input', 'local-search-result');
      this.onclick = null
    }
  </script>



  <script  src="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.css" />

  <script>
    $('#post img:not(.no-zoom img, img[no-zoom]), img[zoom]').each(
      function () {
        var element = document.createElement('a');
        $(element).attr('data-fancybox', 'images');
        $(element).attr('href', $(this).attr('src'));
        $(this).wrap(element);
      }
    );
  </script>







  
  
    <script>
      !function (e, t, a) {
        function r() {
          for (var e = 0; e < s.length; e++) s[e].alpha <= 0 ? (t.body.removeChild(s[e].el), s.splice(e, 1)) : (s[e].y--, s[e].scale += .004, s[e].alpha -= .013, s[e].el.style.cssText = "left:" + s[e].x + "px;top:" + s[e].y + "px;opacity:" + s[e].alpha + ";transform:scale(" + s[e].scale + "," + s[e].scale + ") rotate(45deg);background:" + s[e].color + ";z-index:99999");
          requestAnimationFrame(r)
        }

        function n() {
          var t = "function" == typeof e.onclick && e.onclick;
          e.onclick = function (e) {
            t && t(), o(e)
          }
        }

        function o(e) {
          var a = t.createElement("div");
          a.className = "heart", s.push({
            el: a,
            x: e.clientX - 5,
            y: e.clientY - 5,
            scale: 1,
            alpha: 1,
            color: c()
          }), t.body.appendChild(a)
        }

        function i(e) {
          var a = t.createElement("style");
          a.type = "text/css";
          try {
            a.appendChild(t.createTextNode(e))
          } catch (t) {
            a.styleSheet.cssText = e
          }
          t.getElementsByTagName("head")[0].appendChild(a)
        }

        function c() {
          return "rgb(" + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + ")"
        }

        var s = [];
        e.requestAnimationFrame = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || function (e) {
          setTimeout(e, 1e3 / 60)
        }, i(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"), n(), r()
      }(window, document);
    </script>
  














<script src="/my_blog/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"log":false,"pluginJsPath":"lib/","pluginModelPath":"assets/","pluginRootPath":"live2dw/","tagMode":false});</script></body>
</html>
